﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FrmDoRole.aspx.cs" Inherits="Web.AdminPage.FrmDoRole" %>

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div id="tools">
            <div role="form" class="form-inline ">
            </div>
        </div>
    </div>
    <div class="ibox float-e-margins">

        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">

                    <div class="example">
                        <label class="col-sm-3 control-label">权限列表：</label>
                        <div class="col-sm-9">
                            <%foreach (var item in list) %>
                            <%{ %>
                            <label class="checkbox-inline">
                                <input type="checkbox" onclick="checkboxOnclick(this)" GXId="<%=item.GXId %>"  value="<%=item.Id %>"  <%=item.isSelect?"checked":"" %> ><%=item.Name %></label>
                            <% } %>

                           
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.min.js?v=3.3.6"></script>
    <!-- 自定义js -->
    <script src="../js/content.js?v=1.0.0"></script>
    <!-- Bootstrap table -->
    <script src="../js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="../js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="../js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <!-- Peity -->

    <script src="../js/plugins/layer/laydate/laydate.js"></script>
    <script>
        function checkboxOnclick(ck) {
        
            $.ajax({
                type: 'post',
                url: '../Hanlder/Role_userHandler.ashx?Method=Edit',
                data: { Id: $(ck).attr('GXId'),rid:"<%=RoleId%>",mid:$(ck).val() },
                success: function (data) {
                 
                    var res = $.parseJSON(data);
                    if (res.states == 0) {
                        parent.layer.msg('操作成功');
                    } else {
                        parent.layer.msg(res.msg);
                    }
                }
            });

        }
    </script>
</body>
</html>
